-
Notifications
You must be signed in to change notification settings - Fork 12
Feature: util hash #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: util hash #92
Conversation
|
@HOMODELUNA is attempting to deploy a commit to the microcber's projects Team on Vercel. A member of the Team first needs to authorize it. |
Lancern
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The operator() page looks good, but the std::hash page needs some major changes, including utility component enhancements.
| Defined in header <CppHeader name="bitset" />. | ||
|
|
||
| Defined in header <CppHeader name="coroutine" />. | ||
|
|
||
| Defined in header <CppHeader name="chrono" />. | ||
|
|
||
| Defined in header <CppHeader name="filesystem" />. | ||
|
|
||
| Defined in header <CppHeader name="functional" />. | ||
|
|
||
| Defined in header <CppHeader name="memory" />. | ||
|
|
||
| Defined in header <CppHeader name="optional" />. | ||
|
|
||
| Defined in header <CppHeader name="stacktrace" />. | ||
|
|
||
| Defined in header <CppHeader name="string" />. | ||
|
|
||
| Defined in header <CppHeader name="string_view" />. | ||
|
|
||
| Defined in header <CppHeader name="system_error" />. | ||
|
|
||
| Defined in header <CppHeader name="text_encoding" />. | ||
|
|
||
| Defined in header <CppHeader name="thread" />. | ||
|
|
||
| Defined in header <CppHeader name="typeindex" />. | ||
|
|
||
| Defined in header <CppHeader name="variant" />. | ||
|
|
||
| Defined in header <CppHeader name="vector" />. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This series of header files take too much screen space on the page. I think we have to come up with a way to get around this.
| - If `std::hash<Key>` is not provided by the program or the user, it is disabled. | ||
| - Otherwise, `std::hash<Key>` is enabled if all following conditions are satisfied: | ||
| - All following requirements are satisfied: | ||
| - [Hash](../named_req/Hash.html "cpp/named req/Hash") (with `Key` as the function call argument type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use <DocLink> for all cross links within cppdoc.
|
|
||
| Given a type `Key`, each specialization `std::hash<Key>` is either _enabled_ or _disabled_ : | ||
|
|
||
| - If `std::hash<Key>` is not provided by the program or the user, it is disabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please leave only one space between - and If.
| | | | | ||
| |---|---| | ||
| |(constuctor) | <Desc kind="public member function">constructs a hash function object </Desc>| | ||
| |<DocLink dest="/cpp/library/utility/hash/operator-call"> `operator()` </DocLink> | <Desc kind="public member function">calculates the hash of the argument </Desc>| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. This is not right. We need to implement a component for such content.
|
|
||
| Possible outputs: | ||
|
|
||
| ```cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code block does not contain C++ source code.
| | [LWG 2119](https://cplusplus.github.io/LWG/issue2119) | C++11 | specializations for extended integer types were missing | provided | | ||
| | [LWG 2148](https://cplusplus.github.io/LWG/issue2148) | C++11 | specializations for enumerations were missing | provided | | ||
| | [LWG 2543](https://cplusplus.github.io/LWG/issue2543) | C++11 | `std::hash` might not be SFINAE-friendly | made SFINAE-friendly | | ||
| | [LWG 2817](https://cplusplus.github.io/LWG/issue2817) | C++11 | specialization for [std::nullptr\_t](../types/nullptr_t.html "cpp/types/nullptr_t") was missing | provided | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use <DRList> for defect reports list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in my new commit from the same franch, I fixed these problems, and added relevant name requesitions, what should I do then?
|
in my new commit from the same franch, I fixed these problems, and added relevant name requesitions, what should I do then?
Is there anything I can do to fix the task? |
No, the task is broken for now. I'll fix it later. |
Lancern
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix another two nits. After fixed I'll land this PR first.
| @@ -0,0 +1 @@ | |||
| label: Name Requirements | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| label: Name Requirements | |
| label: Named Requirements |
| @@ -0,0 +1,59 @@ | |||
| --- | |||
| title: "C++ named requirements: CopyAssignable" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| title: "C++ named requirements: CopyAssignable" | |
| title: "CopyAssignable" |
Please also apply similar modifications to other page titles in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in commit 46972ee
|
Thanks! This PR still has some formatting issues, but let's land it for now and later I'll address these issues in separate patches. |

migrate
std::hashfrom https://en.cppreference.com/w/cpp/utility/hash.htmlmigrate
std::hash<Key>::operator()from https://en.cppreference.com/w/cpp/utility/hash/operator().html